Feature/ercot data access gaps#6
Conversation
Co-authored-by: kvkenyon <kvkenyon@utexas.edu>
Implements features identified in ERCOT data access gap analysis: Dashboard endpoints (dashboard.py): - Implement actual HTTP calls to ERCOT dashboard JSON endpoints - Add get_status(), get_fuel_mix(), get_renewable_generation() - Add get_supply_demand(), get_daily_prices(), get_capacity_committed() - New dataclasses: GridStatus, FuelMixEntry, RenewableStatus Rate limiting (rate_limiter.py): - Add token bucket RateLimiter and AsyncRateLimiter classes - Enforce ERCOT's 30 req/min limit proactively - Integrate into ERCOTBase._call_endpoint_raw() 5-minute resolution (api.py): - Add resolution parameter to get_wind_forecast() and get_solar_forecast() - Support "hourly" (default) and "5min" resolutions - Route to appropriate NP4-733/738/743/746 endpoints New endpoints (api.py): - Add get_dc_tie_flows() for DC tie data (NP6-626-CD) - Add get_total_generation() for system generation (NP6-625-CD) - Add get_system_wide_actuals() for SCED actuals (NP6-235-CD) EIA integration (eia.py): - Add EIAClient for supplementary ERCOT data via EIA API - Methods: get_demand(), get_generation(), get_generation_by_fuel() - Useful for data before December 2023 Polling utilities (polling.py): - Add ERCOTPoller class for continuous data monitoring - Support callback and generator patterns - Include exponential backoff and rate limit awareness Documentation: - Add API data availability constants and developer resource URLs - Update CLAUDE.md with data availability limitations - Update README.md and tinygrid/README.md with new features Tests: - Add comprehensive tests for all new modules - Coverage increased from 79% to 95% - 746 total tests (150 new tests added)
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
|
@cursoragent Codecov Report Files with missing lines Patch % Lines |
|
All tests pass and coverage has improved. Here's a summary of what I've done: SummaryI added comprehensive tests to improve code coverage for the 4 files flagged by Codecov: 1.
|
Co-authored-by: kvkenyon <kvkenyon@utexas.edu>
|
Cursor Agent can help with this pull request. Just |
Note
Introduces multiple data-access expansions and resiliency features with corresponding docs and tests.
get_status(),get_fuel_mix(),get_renewable_generation(),get_supply_demand(),get_daily_prices()intinygrid/ercot/dashboard.pywith helpers (FuelMixEntry,RenewableStatus)EIAClient(tinygrid/ercot/eia.py) for pre-2023 ERCOT data via EIA (demand, generation, fuel mix, interchange)ERCOTPoller,poll_latest(tinygrid/ercot/polling.py) with backoff and error handlingtinygrid/utils/rate_limiter.py) and integrate intoERCOTBaseviarate_limit_enabled/requests_per_minuteresolution="5min"and regional variants; addget_dc_tie_flows(),get_total_generation(),get_system_wide_actuals()tinygrid/constants/ercot.pyERCOTBase._products_to_dataframeREADME.md,CLAUDE.md,tinygrid/README.md) and project structure; add comprehensive tests (tests/test_dashboard.py,test_eia.py,test_polling.py,test_rate_limiter.py,test_ercot_api_methods.py, etc.) increasing coverage to ~95%Written by Cursor Bugbot for commit 04aad12. This will update automatically on new commits. Configure here.